package com.ofc.chart;

import com.ofc.chart.engine.ChartJsonEngine;
import com.ofc.chart.engine.IChartJsonBuilder;
import com.ofc.chart.model.Bar3D;
import com.ofc.chart.model.Line;
import com.ofc.chart.model.Pie;

/**
 * Chart Json 构建服务类
 * 
 * @author zhangpeng
 * @date 2012-12-6
 */
public class ChartJsonService {
	private IChartJsonBuilder builder;

	public String buildBar3DJson(Bar3D bar3D) {
		String json = null;
		builder = ChartJsonEngine.createBar3DJson(bar3D);
		json = builder.buildJson();
		return json;
	}

	public String buildPieJson(Pie pie) {
		String json = null;
		builder = ChartJsonEngine.createPieJson(pie);
		json = builder.buildJson();
		return json;
	}

	public String buildLineJson(Line line) {
		String json = null;
		builder = ChartJsonEngine.createLineJson(line);
		json = builder.buildJson();
		return json;
	}

}
